package cz.proks.bank.service;

import javax.activation.DataHandler;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlMimeType;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
import javax.xml.ws.soap.MTOM;

import cz.proks.bank.service.domain.ReportRequest;
import cz.proks.bank.service.domain.ReportRequest.AccountRecord;
import cz.proks.bank.service.exception.ReportException;

@MTOM
@WebService(targetNamespace = "http://bank.proks.cz/service/FileService/")
public interface FileService {
	
	@WebMethod (operationName = "generateAccountReport")
	@RequestWrapper(className = "cz.proks.bank.service.domain.ReportRequest")
	@ResponseWrapper(className = "cz.proks.bank.service.domain.Report")
	@WebResult(name = "report")
	public DataHandler generateAccountReport(@WebParam(name = "bankCode") String bankCode, 
											 @WebParam(name = "accountNumber") Integer accountNumber, 
											 @WebParam(name = "records") AccountRecord[] records) throws ReportException;
}
